Skip to content

Show changed files for Kwt worktrees - #206

Merged
wesm merged 11 commits into
kenn-io:mainfrom
sarcasticbird:feature/git-change-tracker
Sep 6, 2026
Merged

Show changed files for Kwt worktrees#206
wesm merged 11 commits into
kenn-io:mainfrom
sarcasticbird:feature/git-change-tracker

Conversation

@sarcasticbird

@sarcasticbird sarcasticbird commented Aug 27, 2026

Copy link
Copy Markdown
Contributor
  • Adds an expandable changed-files panel to Kwt worktree rows with compact Git status codes and explicit refresh feedback.

  • Uses Ghosthub’s revision-pinned Kwt helper for generation-fenced local and remote inspection; Ghosthub does not parse or mutate Git state itself.

  • Fails closed when change inspection is incomplete and rechecks immediately before destructive worktree removal.

  • Keeps automatic refresh demand-driven, coalesced, concurrency-bounded, backoff-aware, and silent so terminal interaction remains responsive; initial and manual loads share visible activity feedback.

  • Updates the worktree guide with a sanitized deterministic screenshot supplied by companion draft PR Add changed-file guide screenshot #204.

@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:04 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:04 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:04 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

roborev: Combined Review (868b4a8)

Verdict: One medium-severity issue requires attention; no high or critical issues were identified.

Medium

  • Sources/App/WorkspaceSceneModel.swift:7723 — Always Live reconciliation depends on tmuxFreshHostIDs, populated only by default-server discovery. If default discovery fails but a direct named-socket discovery succeeds, the named session is recorded but does not receive a preview. Reconcile successful named-socket discoveries independently of default-server freshness.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 18m43s

@sarcasticbird
sarcasticbird force-pushed the feature/git-change-tracker branch from 868b4a8 to 175544d Compare August 27, 2026 16:38
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:38 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:38 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:38 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:39 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:39 — with GitHub Actions Active
@sarcasticbird
sarcasticbird deployed to sandbox-image-promotion-status August 27, 2026 16:40 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Aug 27, 2026

Copy link
Copy Markdown

roborev: Combined Review (175544d)

Verdict: One medium-severity issue requires attention before merge.

Medium

  • Missing website asset: website/scripts/sync-assets.sh:27, website/docs/content/projects-worktrees.md:106
    The guide requires guide-worktree-changes.png, but the asset is absent from the authoritative website-assets branch, so asset synchronization will fail. Publish the generated screenshot before requiring it in the sync list and guide.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 12m13s

@sarcasticbird

Copy link
Copy Markdown
Contributor Author

The missing guide-worktree-changes.png asset is included in companion draft PR #204, which publishes it to the authoritative website-assets branch. PRs #204 and #206 should land together.

@wesm

wesm commented Sep 3, 2026

Copy link
Copy Markdown
Member

rebasing this

@wesm
wesm force-pushed the feature/git-change-tracker branch from 175544d to a44d0b6 Compare September 3, 2026 14:10
@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 14:10 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 14:10 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 14:11 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (a44d0b6)

Verdict: Changes require fixes before merging due to one high-severity dependency issue and two medium-severity regressions.

High

  • Sources/App/KwtWorktreeClient.swift:589-620, KWT_REVISION: The app now depends on kwt changes, but the pinned production KWT revision is unchanged and only the demo shim implements the command. Packaged or remote helpers lacking it will cause change inspection and worktree-removal preflight to fail. Pin and publish a KWT revision implementing the new contract, with an enabled contract test.

Medium

  • Sources/App/KwtWorktreeClient.swift:383-410: Any unstructured nonzero result other than statuses 126/127 is classified as retryable. Usage errors, unsupported commands, and invalid arguments may therefore poll indefinitely instead of waiting for manual refresh. Treat unrecognized failures as non-retryable, or classify only known transport/timeout statuses as retryable.

  • website/scripts/sync-assets.sh:27, website/docs/content/projects-worktrees.md:108: The documentation references guide-worktree-changes.png, but the asset is absent from the website-assets branch. Asset synchronization/builds will fail. Publish the generated screenshot before merging.


Reviewers: 2 done | Synthesis: codex, 7s | Total: 12m9s

@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 17:04 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 17:04 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 3, 2026 17:04 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 3, 2026

Copy link
Copy Markdown

roborev: Combined Review (5d9a06c)

Verdict: One medium-severity correctness issue found; no security weaknesses identified.

Medium

  • Stale results can cross project registrationsSources/UI/WorktreeChangesState.swift:5-13
    WorktreeChangesIdentity omits the project’s registrationFingerprint. Because project/worktree IDs may be reused when the same repository and path are re-registered, an in-flight read from the old registration can match the new identity and publish stale results. Include the registration fingerprint in the identity and validate it before publishing results.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 22m17s

- Show changed files beneath expanded worktrees in the sidebar.
- Bound background polling and leave permanent command failures for manual retry.
- Fence change results by host route, project registration, repository, path, and worktree generation.
- Keep the deterministic website demo on the current kwt inventory contract.
- Document the workflow with its published guide capture.

Generated with OpenAI Codex

Co-authored-by: Wes McKinney <wesmckinn+git@gmail.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm force-pushed the feature/git-change-tracker branch from 5d9a06c to b4eaae0 Compare September 4, 2026 04:47
@wesm
wesm deployed to sandbox-image-promotion-status September 4, 2026 04:47 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 4, 2026 04:47 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 4, 2026 04:47 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 4, 2026

Copy link
Copy Markdown

roborev: Combined Review (b4eaae0)

Verdict: One medium-severity issue requires attention; otherwise, the reviewed changes are sound.

Medium

  • Sources/App/WorktreeChangesLoaderAuthority.swift:19-51 — Changed-file loads bypass ensureRemoteKwtForOperation, so cached worktree inventory may remain visible while the managed remote helper is missing or stale. The panel receives status 127, treats it as non-retryable, and manual refresh repeats the failure without provisioning. Route loads through a scene-model method that revalidates and provisions the remote helper before invoking kwt changes.

Reviewers: 2 done | Synthesis: codex, 7s | Total: 11m40s

@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 02:16 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 02:16 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 5, 2026

Copy link
Copy Markdown

roborev: Combined Review (fa7f0b1)

Verdict: No Medium, High, or Critical issues found.

Reviewers identified no actionable findings at the requested severity threshold.


Reviewers: 2 done | Synthesis: codex, 6s | Total: 41m48s

Completed inventory refreshes built change identities for every worktree
on the UI thread, even when no changes panel had ever been opened.
Leave unused changes state idle and resolve identities only for tracked
worktrees when pruning expanded panels and cached results.

Keep registration changes and removed worktrees subject to the existing
pruning rules so the smaller refresh workload does not retain stale files.

Generated with OpenAI Codex

Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 13:26 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 13:26 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 13:27 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 5, 2026

Copy link
Copy Markdown

roborev: Combined Review (5a60e21)

Verdict: Two medium-severity issues require attention.

Medium

  • Sources/App/WorktreeChangesReadCoordinator.swift:54-64 — Cancellation may arrive before enqueue registers its continuation. cancel(key:) then finds no entry, allowing the already-cancelled request to be queued or started and run to completion. Track pre-registration cancellations or check cancellation during continuation registration so the request is immediately resumed with CancellationError.

  • Sources/App/KwtWorktreeClient.swift:94-110, Sources/UI/WorktreeChangesState.swift:451-455malformedChangeStatus is not classified as non-retryable, so the polling loop retries indefinitely for malformed successful responses. Make malformed inspection responses conform to WorktreeChangesRetryClassifying with isRetryable == false.


Reviewers: 2 done | Synthesis: codex, 8s | Total: 25m57s

A caller can be canceled before the coordinator registers its waiter.
Check cancellation at registration so that request cannot start an
inspection or consume a read slot while its cancellation callback waits.

The Herdr reconnect test counted surface lookups as launches. A successful
reconnect can make more than two lookups, leaving its exact-count wait
stuck. Wait for the replacement connection while retaining the checks
that the dead lease is invalidated and probed only once.

Publish the SSH cancellation fixture's report only after its write finishes.
File existence alone previously let the test read an empty report while
the helper was still writing its termination result.

Generated with OpenAI Codex

Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 14:20 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 14:20 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 14:20 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 5, 2026

Copy link
Copy Markdown

roborev: Combined Review (880c145)

Verdict: One medium-severity issue remains; otherwise, no issues were identified.

Medium

  • Sources/App/KwtWorktreeClient.swift:145-181 — The new 16 MB output limit applies to all KWT operations, including create, branch, and removal commands. This increases buffering from 1 MB and may allow substantially higher memory use from malformed or unexpectedly verbose output. Keep the smaller limit for normal operations and use the expanded limit only for change-inspection runners.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 13m38s

Changed-file responses can exceed the normal command output budget, but
that exception should not increase buffering for worktree creation,
branch listing, or removal. Keep those local and SSH operations on the
default 1 MiB limit and reserve the 16 MiB limit for change inspection.

Generated with OpenAI Codex

Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 17:35 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 17:35 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 5, 2026 17:35 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 5, 2026

Copy link
Copy Markdown

roborev: Combined Review (ae420e9)

Verdict: Medium-severity issue found; Windows UNC worktrees are unsupported.

  • MediumSources/UI/WorktreeChangesState.swift:80-88: Windows worktree identities accept only drive-letter paths, rejecting valid UNC paths such as \\server\share\repo. This prevents changed-file inspection and polling. Accept and normalize UNC paths consistently, with behavioral coverage.

Reviewers: 2 done | Synthesis: codex, 5s | Total: 18m42s

Windows network-share worktrees appeared in inventory but could not open
the changes panel because identity validation accepted only drive paths.
Accept complete UNC paths while keeping relative and incomplete paths
ineligible. Preserve the helper's original path and the existing Windows
identity normalization across inventory refreshes.

Generated with OpenAI Codex

Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 6, 2026 00:16 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 6, 2026 00:16 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 6, 2026 00:16 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 6, 2026

Copy link
Copy Markdown

roborev: Combined Review (9fdccde)

Verdict: One medium-severity host-routing race remains; no critical or high-severity issues found.

Medium

  • Sources/App/WorkspaceSceneModel.swift:2781 — Remote KWT provisioning does not revalidate the captured worktree’s host afterward. If host configuration changes during provisioning, the helper may install on the obsolete SSH destination while inspection runs against the new one. Capture and validate the resolved host before and after provisioning, aborting if its route or platform identity changes.

Reviewers: 2 done | Synthesis: codex, 6s | Total: 32m0s

Host settings can change while remote Kwt provisioning is in flight.
Fresh inventory can then restore the same worktree identity on the new
endpoint before the old provisioning call returns. Do not carry that
old readiness result into inspection on the replacement host.

Revalidate the captured command target and platform after provisioning.
Check the platform separately because Linux and macOS both resolve to
POSIX command targets.

Generated with OpenAI Codex

Co-authored-by: OpenAI Codex <noreply@openai.com>
@wesm
wesm deployed to sandbox-image-promotion-status September 6, 2026 02:50 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 6, 2026 02:50 — with GitHub Actions Active
@wesm
wesm deployed to sandbox-image-promotion-status September 6, 2026 02:51 — with GitHub Actions Active
@roborev-ci

roborev-ci Bot commented Sep 6, 2026

Copy link
Copy Markdown

roborev: Combined Review (6ebe711)

No issues found.


Reviewers: 2 done | Synthesis: codex | Total: 12m48s

@wesm
wesm merged commit 5558228 into kenn-io:main Sep 6, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants